<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE>
<html>
<head>
    <title>题目列表</title>

    <smLink1>
        <link rel="stylesheet" href="<%=basePath%>js/lib/ace/components/bootstrap-datepicker/dist/css/bootstrap-datepicker3.min.css">
        <link rel="stylesheet" href="<%=basePath%>js/lib/ace/components/bootstrap-datepicker/dist/css/bootstrap-datepicker3.standalone.min.css">
    </smLink1>
    <smLink2>
        <link rel="stylesheet" href="<%=basePath%>js/lib/uploadifive/uploadifive.css">
    </smLink2>

    <smScript1>
        <script type="text/javascript" src="<%=basePath%>js/lib/ace/components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
        <script type="text/javascript" src="<%=basePath%>js/lib/ace/components/bootstrap-datepicker/dist/locales/bootstrap-datepicker.zh-CN.min.js"></script>
        <script type="text/javascript" src="<%=basePath%>js/lib/ace/components/datatables/media/js/jquery.dataTables.min.js"></script>
        <script type="text/javascript" src="<%=basePath%>js/lib/ace/components/_mod/datatables/jquery.dataTables.bootstrap.min.js"></script>
    </smScript1>
    <smScript2>
        <script type="text/javascript" src="<%=basePath%>js/lib/uploadifive/jquery.uploadifive.min.zh_cn.js"></script>
        <script type="text/javascript" src="<%=basePath%>js/common/uploadifive.utils.js"></script>
        <script type="text/javascript" src="<%=basePath%>js/common/datatables.utils.js"></script>
        <script type="text/javascript" src="<%=basePath%>js/jsp/question/list.js"></script>
    </smScript2>
</head>

<body>
<div id="breadcrumbs" class="breadcrumbs ace-save-state">
    <ul class="breadcrumb">
        <li>
            <span>题目列表</span>
        </li>
    </ul>
</div>

<div class="page-content">
    <div class="row">
        <div class="col-xs-12">
            <div class="clearfix">
                <div class="pull-right tableTools-container"></div>
            </div>

            <div class="table-header p-0">
                <h4 class="header m-0 p-l-10 p-t-5 p-b-5">题目列表</h4>

                <form id="question_form" role="form" class="form-inline m-0 p-l-10 p-b-5">
                    <div class="form-group m-r-10">
                        <label class="control-label" for="question_title">题目：</label>

                        <input id="question_title" class="form-control input-sm" type="text" placeholder="输入题目">
                    </div>

                    <div class="form-group m-r-10">
                        <label class="control-label" for="industry_code">所属行业：</label>

                        <select id="industry_code" class="form-control input-sm search-select">
                            <option selected="selected" value="">全部</option>
                            <option value="A">煤矿</option>
                            <option value="B">非煤矿山</option>
                            <option value="C">危化烟花爆竹</option>
                            <option value="D">职业健康和工贸</option>
                            <option value="E">公共</option>
                            <option value="F">八大行业</option>
                            <option value="X">其他</option>
                        </select>
                    </div>

                    <div class="form-group m-r-10">
                        <label class="control-label" for="question_type">类型：</label>

                        <select id="question_type" class="form-control input-sm search-select">
                            <option selected="selected" value="">全部</option>
                            <option value="0">单选</option>
                            <option value="1">多选</option>
                        </select>
                    </div>

                    <div class="form-group m-r-10">
                        <label class="control-label" for="question_answer">答案：</label>

                        <select id="question_answer" class="form-control input-sm search-select">
                            <option selected="selected" value="">全部</option>
                            <option value="A">A</option>
                            <option value="B">B</option>
                            <option value="C">C</option>
                            <option value="D">D</option>
                            <option value="AB">AB</option>
                            <option value="AC">AC</option>
                            <option value="AD">AD</option>
                            <option value="BC">BC</option>
                            <option value="BD">BD</option>
                            <option value="CD">CD</option>
                            <option value="ABC">ABC</option>
                            <option value="ACD">ACD</option>
                            <option value="BCD">BCD</option>
                            <option value="ABCD">ABCD</option>
                        </select>
                    </div>

                    <div class="form-group">
                        <label class="control-label">日期：从</label>

                        <div class="input-group input-group-sm">
                            <input id="start_date" class="form-control" type="text" readonly="readonly" placeholder="开始日期">

                            <span class="input-group-addon">
                                <i class="ace-icon iconfont icon-calendar cursor-default f-s-12"></i>
                            </span>
                        </div>

                        <label class="control-label">至</label>

                        <div class="input-group input-group-sm">
                            <input id="end_date" class="form-control" type="text" readonly="readonly" placeholder="结束日期">

                            <span class="input-group-addon">
                                <i class="ace-icon iconfont icon-calendar cursor-default f-s-12"></i>
                            </span>
                        </div>
                    </div>
                </form>

                <form role="form" class="form-inline m-0 p-l-10 p-b-5">
                    <div class="form-group">
                        <shiro:hasPermission name="question:list">
                            <button id="search_question_btn" class="btn btn-danger btn-xs m-r-30" type="button">
                                <i class="ace-icon iconfont icon-search f-s-12"></i>搜索
                            </button>
                        </shiro:hasPermission>

                        <shiro:hasPermission name="question:create">
                            <button id="upload_question_btn" class="btn btn-success btn-xs" type="button">
                                <i class="ace-icon iconfont icon-upload f-s-12"></i>上传题库
                            </button>
                        </shiro:hasPermission>
                    </div>
                </form>
            </div>

            <div id="question_queue"></div>

            <div>
                <table id="question_table" class="table table-striped table-bordered table-hover"></table>
            </div>
        </div>
    </div>
</div>
</body>

<smModal>
    <div id="question_modal" role="dialog" class="modal fade" aria-hidden="true">
        <div class="modal-dialog width-800">
            <div class="modal-content">
                <div class="modal-header b-c-blue c-white height-60 line-height-60">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        <i class="ace-icon iconfont icon-fork"></i>
                    </button>

                    <h1 class="modal-title f-s-16 text-no-break"></h1>
                </div>

                <div class="modal-body p-0 height-680 text-break overflow-x-hidden overflow-y-auto"></div>

                <div class="modal-footer p-t-0 p-b-0 center b-c-gray height-60 line-height-60 text-no-break">
                    <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
    </div>
</smModal>
</html>